package com.invengo.testrfid.di.module;

import com.invengo.testrfid.mvp.contract.CageDetailContract;
import com.invengo.testrfid.mvp.model.CageDetailModel;
import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;


@Module
public class CageDetailModule {
    private CageDetailContract.View view;

    /**
     * 构建CageDetailModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public CageDetailModule(CageDetailContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    CageDetailContract.View provideCageDetailView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    CageDetailContract.Model provideCageDetailModel(CageDetailModel model) {
        return model;
    }
}